-- GENERATED SPELL FOR [Greyheart Tidecaller] --


function spell0_21229(pUnit, Event) --@Poison Shield,Self--
pUnit:FullCastSpellOnTarget(39027,pUnit)
pUnit:RegisterEvent('Sorts_21229', 659, 1)
end

function spell1_21229(pUnit, Event) --@Water Elemental Totem,Self--
pUnit:FullCastSpellOnTarget(38624,pUnit)
pUnit:RegisterEvent('Sorts_21229', 520, 1)
end

function Sorts_21229(pUnit, Event)
local choix_sorts_21229 = math.random(0, 1)
if choix_sorts_21229 == 0 then
pUnit:RegisterEvent('spell0_21229', 1, 1)
end
if choix_sorts_21229 == 1 then
pUnit:RegisterEvent('spell1_21229', 1, 1)
end
end

function mob21229_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21229', math.random(1500, 3000), 1)
end

function mob21229_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21229_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21229_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21229, 1, 'mob21229_Action')
RegisterUnitEvent(21229, 2, 'mob21229_Leave')
RegisterUnitEvent(21229, 3, 'mob21229_Kill')
RegisterUnitEvent(21229, 4, 'mob21229_Die')
